<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="includes.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8;">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Expires" content="-1">
    <meta http-equiv="Cache-Control" content="no-cache">
    
    <security:authorize ifAnyGranted="ROLE_USER">
	   <c:if test="${! empty interval}">
	       <meta http-equiv="Refresh" content="${interval}">
	   </c:if>
    </security:authorize>
    
	<link type="text/css" href="css/jquery-ui-1.7.1.custom.css" rel="Stylesheet" /> 
	<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
	<script type="text/javascript" src="js/jquery-ui-1.7.1.custom.min.js"></script>

	<title>
	    <spring:message code="messages.home.title"/>
	</title>
	
	<script type="text/javascript">
	<!--
	   function showConfDlg(confirmedFun) {
	        $("#rejectConfDlg").dialog({
	            bgiframe: true,
	            width: 'auto',
	            modal: true,
	            buttons: {
	                "Отмена": function() {
	                    $(this).dialog('close');
	                 },
	                "Нет": function() {
	                   $(this).dialog('close');
	                },
	                "Да": function() {
	                    $(this).dialog('close');
	                    confirmedFun();
	                 }
	            },
	            close: function() {
	                $(this).dialog('destroy');
	           }
	        });
	        return false;
	    }
	//-->
	</script>
</head>

<body style="background-color: #E0E6F1">
   <jsp:include page="header.jsp"/>
	<security:authorize ifAnyGranted="ROLE_USER">
	    <jsp:include page="task.jsp"/>
	</security:authorize>
	
	<security:authorize ifAnyGranted="ROLE_ADMINISTRATOR">
	    <jsp:include page="command_center.jsp"/>
	</security:authorize>
	
	<div id="hiddenContent" style="display: none;">
        <div id="rejectConfDlg" title='<spring:message code="messages.control_center.rejecting_conf"/>'>
            <p>
                <span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;">
                </span>
				<security:authorize ifAnyGranted="ROLE_USER">
				    <spring:message code="messages.task.reject_conf_text"/>
				</security:authorize>
                <security:authorize ifAnyGranted="ROLE_ADMINISTRATOR">
                    <spring:message code="messages.control_center.reject_conf_text"/>
                </security:authorize>
            </p>
        </div>   
	</div>
	
</body>
</html>